﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;

namespace EasyMvc.Models
{
     [Table("User")]
    public class User
    {
        [Required(ErrorMessage = "用户名不能为空")]
        [StringLength(50)]
        [Key]
        public string Username { get; set; }

        [StringLength(50)]
        [Required(ErrorMessage = "密码不能为空")]
        public string Password { get; set; }

        public DateTime? AddTime { get; set; }

        [StringLength(100)]
        public string Description { get; set; }

        [StringLength(500)]
        public string RoleIds { get; set; }

        //[NotMapped]
        //public List<Power> PowerList { get; set; }
        //[NotMapped]
        //public List<Role> RoleList { get; set; }

        public User()
        {
            
        }
    }
   
}
